<template>
	<view class="classLayout pagebg">
		<custom-nav-bar title="分类" :ismine="false"></custom-nav-bar>
		<view class="classify">
			<theme-item v-for="item in classifyList" :key="item._id" :item="item"></theme-item>
		</view>
	</view>
</template>

<script setup>
	import { ref } from 'vue';
	import {apiGetClassifyList} from '@/api/apis.js';
	import {onShareAppMessage , onShareTimeline} from '@dcloudio/uni-app'
	
	const classifyList = ref([])
	const getClassifyList = async ()=>{
		let res = await apiGetClassifyList({
			pageSize:15
		});
		classifyList.value=res.data.data;
	}
	//分享给好友
	onShareAppMessage((e)=>{
		return{
			title:"琨琨壁纸",
			path:"/pages/index/index"
		}
	})
	//分享到朋友圈
	uni.showShareMenu({
		title:"琨琨壁纸"
	})
	getClassifyList()
</script>

<style lang="scss" scoped> 
.classLayout{
	.classify{
		padding: 30rpx;
		display: grid;
		grid-template-columns: repeat(3,1fr);
		gap:15rpx;
	}
}	       
</style>
